<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        //声明一个set
        let s = new Set()
        //会自动去重
        let s2 = new Set([1,2,3,4,4])
        console.log(s2)

        //添加
        s2.add(10)
        //删除
        s2.delete(4)
        //检测
        s2.has(1)

        //清空
        s2.clear()


        for(let v of s2){
            console.log(v)
        }








    </script>
    
</body>
</html>